package com.weixin.project.Dao;

import com.weixin.project.Common.Enum.MsgStatus;
import com.weixin.project.Entity.Message;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface MsgDao extends JpaRepository<Message, Integer> {
    Page<Message> getMessagesByReceiverId(Integer userId, Pageable pageable);
    Integer countMessagesByReceiverId(Integer userId);
    Integer countMessagesByReceiverIdAndStatus(Integer userId, MsgStatus status);
}
